package com.yehuo.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("t_messages")
public class Messages implements Serializable {


    /**
     * 搜索关键字
     */
    private transient String search;
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 消息ID
     */
    @TableField(value = "_mid")
    private String mid;

    /**
     * 会话类型
     */
    @TableField(value = "_type")
    private String type;


    /**
     * 消息类型
     */
    @TableField(value = "_content_type")
    private String contentType;
    /**
     * 发送者ID
     */
    @TableField(value = "_from")
    private String fromID;

    /**
     * 接收者ID
     */
    @TableField(value = "_target")
    private String targetID;

    /**
     * 发送者昵称
     */
    private transient String fromName;

    /**
     * 接收者昵称
     */
    private transient String targetName;

    /**
     * 搜索内容
     */
    @TableField(value = "_searchable_key")
    private String serachContent;

    /**
     * 创建时间
     */
    @TableField(value = "_dt")
    private String createTime;
}
